package com.design.SingletonMode;

/**
 * 静态内部类 推荐 推荐
 */
public class Mode4 {
    private Mode4(){}

    /**
     * 静态内部类
     */
    private static class Singleton{
        private volatile static Mode4 mode4 = new Mode4();
    }

    public static Mode4 getInstance(){
        return Singleton.mode4;
    }
}
